#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void sort(double x[])
{
	double tem;
	int i;
	for (i = 0; i<3; i++)
	{
		if(x[i] < x[i+1])
		{
			tem = x[i];
			x[i] = x[i+1];
			x[i+1] = tem;
		}
	}
	for (i = 2; i>=0; i--)
	{
		if(x[i] < x[i+1])
		{
			tem = x[i];
			x[i] = x[i+1];
			x[i+1] = tem;
		}
	}
}

void print_list(double x[])
{
	int i;
	for(i = 0; i<4; i++)
	{
		printf("%lf ",x[i]);
	}
}

int main()
{
	double x[4];
	double y[4];
	double result;
	scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2], &x[3], &y[3]);
	sort(x);
	sort(y);
	print_list(x);
	print_list(y);
	result = abs(x[1] - x[2]) * abs(y[1] - y[2]);
	printf("%lf", result);
	return 0;
}
